package com.atlin.project.service;

import com.atlin.project.model.domain.TempTemplate;
import com.atlin.project.model.dto.tempTemplate.TempTemplateQueryRequest;
import com.atlin.project.model.vo.TempTemplateVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

/**
 * @author atlin
 * @description tempTemplate
 * @createDate date
 */
public interface TempTemplateService extends IService<TempTemplate> {

    void valid(TempTemplate tempTemplate, boolean add);

    /**
     * 获取封装
     *
     * @param tempTemplate
     * @param request
     * @return
     */
    TempTemplateVO getTempTemplateVO(TempTemplate tempTemplate, HttpServletRequest request);


    /**
     * 获取查询条件
     *
     * @param questionQueryRequest
     * @return
     */
    QueryWrapper<TempTemplate> getQueryWrapper(TempTemplateQueryRequest questionQueryRequest);

    /**
     * 分页获取封装
     *
     * @param questionPage
     * @param request
     * @return
     */
    Page<TempTemplateVO> getTempTemplateVOPage(Page<TempTemplate> questionPage, HttpServletRequest request);

}
